package com.bckj.fastboot.iot.biz.service.impl;

import com.bckj.fastboot.core.lang.model.PageResult;
import com.bckj.fastboot.iot.biz.service.IotAlarmDataQueryService;
import com.bckj.fastboot.iot.common.dto.query.IotAlarmDataQuery;
import com.bckj.fastboot.iot.common.dto.response.IotAlarmDataResponse;
import com.bckj.fastboot.iot.common.repository.IotAlarmDataRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

/**
 * IotAlarmDataQueryServiceImpl
 *
 * @author wfc
 **/
@Service
@RequiredArgsConstructor
public class IotAlarmDataQueryServiceImpl implements IotAlarmDataQueryService {

    private final IotAlarmDataRepository iotAlarmDataRepository;

    @Override
    public IotAlarmDataResponse details(Long id) {
        return iotAlarmDataRepository.details(id);
    }

    @Override
    public PageResult<IotAlarmDataResponse> page(Pageable page, IotAlarmDataQuery query) {
        return iotAlarmDataRepository.page(page, query);
    }
}
